<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="None">
        
        
        <link rel="shortcut icon" href="img/favicon.ico">
        <title>CAN++ User Manual</title>
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/font-awesome.min.css" rel="stylesheet">
        <link href="css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css">

        <script src="js/jquery-1.10.2.min.js" defer></script>
        <script src="js/bootstrap.min.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script> 
    </head>

    <body class="homepage">
        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
            <div class="container">
                <a class="navbar-brand" href=".">CAN++ User Manual</a>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">

                    <ul class="nav navbar-nav ml-auto">
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> Search
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
            <div class="row">
                    <div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
    <div class="navbar-header">
        <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
            <span class="fa fa-angle-down"></span>
        </button>
    </div>

    
    <div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
        <ul class="nav flex-column">
            
            <li class="nav-item" data-level="1"><a href="#can-user-manual" class="nav-link">CAN++ User Manual</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#overview" class="nav-link">Overview</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#trace-view" class="nav-link">Trace view</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#import-trace-file" class="nav-link">Import Trace file</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#replay-trace-file" class="nav-link">Replay Trace file</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-data-bases" class="nav-link">CAN data bases</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-transmit" class="nav-link">CAN transmit</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-logging" class="nav-link">CAN logging</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-hardware-configuration" class="nav-link">CAN hardware configuration</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#remote-control" class="nav-link">Remote control</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#filtering" class="nav-link">Filtering</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-signal-graphs" class="nav-link">CAN signal graphs</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-programming-in-c" class="nav-link">CAN programming in C++</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-diagnostics" class="nav-link">CAN diagnostics</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#can-statistics" class="nav-link">CAN statistics</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#tips" class="nav-link">Tips</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
        </ul>
    </div>
</div></div>
                    <div class="col-md-9" role="main">

<h1 id="can-user-manual">CAN++ User Manual</h1>
<h2 id="overview">Overview</h2>
<p>CAN++ is a free Windows program for receiving, transmitting and analyzing (<em>.asc, </em>.blf) CAN bus messages (CAN Classic and <strong>CAN FD</strong>) for using with <a href="https://github.com/jgressmann/supercan">SuperCAN</a> devices or without CAN hardware (virtual bus). After import of CAN data base files (<em>.</em><em>dbc</em><em>, </em>.<strong>arxml</strong>) CAN signals are shown in symbolic form. Signals can be presented as graphics (wave forms) too.</p>
<p>Furthermore:  </p>
<ul>
<li><strong>CAN simulation</strong> is possible by programming CAN behaviour in C++.  </li>
<li><strong>CAN traces</strong> can be generated, imported and replayed (<em>.asc format, </em>.blf can be imported).  </li>
<li><strong>Diagnostics</strong> can be performed (PDX import, fault memory, measurement and identification data)  </li>
</ul>
<p>There are several devices which are supported by SuperCAN firmware and can be used with CAN++. For example:
- Open Source Hardware: <a href="https://github.com/RudolphRiedel/USB_CAN-FD">USB_CAN-FD</a>
- Off the shelf: <a href="https://www.adafruit.com/product/4759">Adafruit Feather M4 CAN Express</a> (simple <a href="#tips">drag &amp; drop</a> of firmware)</p>
<p>CAN++ can be just started (no installation).</p>
<h2 id="trace-view">Trace view</h2>
<p><img alt="Trace view" src="img/main3.jpg" /></p>
<p>In trace view following features can be used:</p>
<ul>
<li>
<p>toggle between <strong>update view</strong> and <strong>stream view</strong> <img alt="stream view" src="img/toolbar_stream_view.jpg" /></p>
<ul>
<li>update view: displays each message on one row an updates its values</li>
<li>stream view: one row for each incoming message, so it is filling the screen quickly (scroll view)</li>
</ul>
</li>
<li>
<p>switch on <strong>delta time mode</strong> <img alt="stream view" src="img/toolbar_delta_time.jpg" /> so time values show the difference to last message of same Id. So this shows the cycle time.</p>
</li>
<li>
<p>sort view by clicking on headers of each column</p>
</li>
<li>
<p>right click shows menu to:</p>
<ul>
<li>clear view</li>
<li>"copy all" =&gt; copy trace view contents to clip board</li>
<li>import a trace</li>
<li>"Go to..." =&gt; go to a certain time in stream view</li>
</ul>
</li>
</ul>
<h2 id="import-trace-file">Import Trace file</h2>
<p>Trace files (.asc or .blf) can be imported and are shown in trace window. Via menu:</p>
<pre><code>CAN =&gt; Trace import... 
</code></pre>
<p>or by right clicking in trace view window</p>
<p>Also signals from trace can be shown in graphical view either by:<br />
    1. pressing <strong>Reload</strong> button in graphn windows after import<br />
    2. selecting signals for graphical showing before import (checkbox in main window left tree view)  </p>
<p>Option 2. is the best option for big trace files</p>
<h2 id="replay-trace-file">Replay Trace file</h2>
<p>Trace files (.asc or .blf) can be imported and replayed. Via menu:</p>
<pre><code>CAN =&gt; Replay =&gt; Trace file... 
</code></pre>
<p>Loop mode can be set to replay the file continuously (on reaching end of file it is started from beginning):</p>
<pre><code>CAN =&gt; Replay =&gt; Loop
</code></pre>
<p>Replay buffer can be cleared by:</p>
<pre><code>CAN =&gt; Replay =&gt; Clear replay buffer
</code></pre>
<h2 id="can-data-bases">CAN data bases</h2>
<p>CAN data bases files (<em>.dbc, </em>.arxml) can be imported via menu:</p>
<pre><code>CAN =&gt; CAN Data Base =&gt; Import... 
</code></pre>
<p>or in the left tree view in the main window by:  </p>
<ul>
<li>right mouse click and "Import Data Base..."</li>
<li>drag and drop data base where multiple data base files can be dropped at once</li>
</ul>
<h2 id="can-transmit">CAN transmit</h2>
<p>CAN messages can be transmitted via menu:</p>
<pre><code>CAN =&gt; Transmit...
</code></pre>
<p>or by toolbar <img alt="tx" src="img/toolbar_tx.jpg" /></p>
<p>The features are:</p>
<ul>
<li>send options:<ul>
<li>cyclic</li>
<li>once</li>
<li>with time offset</li>
<li>manual by key</li>
<li>manual by click on button "Now"</li>
</ul>
</li>
<li>define signals as raw or physical values  </li>
<li>or define signals with wave configurator  </li>
</ul>
<p><img alt="Tx" src="img/tx.jpg" /></p>
<p>By clicking on cell in column "<strong>Wave</strong>" for a signal a wave form can be specified for a signal instead of using a static value:</p>
<p><img alt="Tx wave" src="img/wave.jpg" /></p>
<h3 id="add-a-can-message-to-transmit-list">Add a CAN message to transmit list</h3>
<p>By pushing button <strong>Add..</strong> a CAN message can be added. All CAN data bases are shown, so a CAN message can be selected and added.  </p>
<p>By selecting <strong>Raw</strong> <img alt="Tx add raw" src="img/tx_add_raw.jpg" /> and pushing <strong>Add</strong> (or just double clicking <strong>Raw</strong>) a CAN Id can be defined by hand (hex value) <img alt="Tx add raw input" src="img/tx_add_raw_input.jpg" /></p>
<h2 id="can-logging">CAN logging</h2>
<p>CAN traffic can be logged to file in well known ASC format. Via Menu:</p>
<pre><code>CAN =&gt; Log to file ...
</code></pre>
<p>or by toolbar <img alt="logging" src="img/toolbar_log.jpg" />  </p>
<p>Logging files are stored in folder <code>log</code> where file name is generated containing the time stamp. </p>
<h2 id="can-hardware-configuration">CAN hardware configuration</h2>
<h3 id="activate-hardware">Activate hardware</h3>
<p>Select connected hardware from list</p>
<pre><code>Settings =&gt; Hardware Select 
</code></pre>
<h3 id="change-hardware-configuration">Change hardware configuration</h3>
<p>Go to</p>
<pre><code>Settings =&gt; Channel Configuration
</code></pre>
<p>Select a channel in the list to see its parameters. Pushing <strong>Apply</strong> will set the parameters. The checkbox determines whether the channel is active or not.</p>
<p><img alt="Channel Configuration" src="img/channel_config.jpg" /></p>
<h4 id="dialog-data">Dialog data</h4>
<table>
<thead>
<tr>
<th>widget</th>
<th>function</th>
<th>notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Channel Number</td>
<td>logical channel number</td>
<td>This number is used in all other dialogs. So this number maps to the selected physical channel in the list above.</td>
</tr>
<tr>
<td>Type</td>
<td>CAN type</td>
<td>CAN classic or CANFD type</td>
</tr>
<tr>
<td>Import from DB</td>
<td>import channel settings from DBC</td>
<td></td>
</tr>
<tr>
<td>Adjust bit timings</td>
<td>enable bit timing config</td>
<td>bit timing parameters widget show up</td>
</tr>
<tr>
<td>Calculate</td>
<td>calculate bit timing values</td>
<td>values are calculated based on Sample Point value</td>
</tr>
<tr>
<td>Reset</td>
<td>undo changes in bit timings</td>
<td></td>
</tr>
<tr>
<td>## Options</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Go to</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<pre><code>Settings =&gt; Options
</code></pre>
<p><img alt="Options" src="img/options.jpg" /></p>
<h3 id="diagnostic-options">Diagnostic options</h3>
<table>
<thead>
<tr>
<th>widget</th>
<th>function</th>
<th>notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Set Can Ids manually</td>
<td>assign Diagnostic CAN Ids</td>
<td>allows setting  CAN Ids for RX/TX. Otherwise CAN Ids are taken from ODX</td>
</tr>
<tr>
<td>CAN Channel</td>
<td>channel for diagnostics</td>
<td></td>
</tr>
<tr>
<td>Log Diags to file</td>
<td>log diagnostic data to folder <strong>log</strong></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="can-sniffer-options">CAN sniffer options</h3>
<table>
<thead>
<tr>
<th>widget</th>
<th>function</th>
<th>notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Show RAW values</td>
<td>show signal raw</td>
<td>beside physical signal value show raw bus signal value too</td>
</tr>
<tr>
<td>Show Error Frames</td>
<td>error frame enable</td>
<td>if enabled trace performance may go down</td>
</tr>
<tr>
<td>Log CAN to file</td>
<td>log CAN data to folder <strong>log</strong></td>
<td></td>
</tr>
<tr>
<td>Start Trigger</td>
<td>Start CAN Id trigger</td>
<td>CAN Id which triggers trace/simulation start, which is chosen in CAN DB tree in left main window by right mouse click</td>
</tr>
<tr>
<td>Stop Trigger</td>
<td>Stop CAN Id trigger</td>
<td>CAN Id which triggers trace/simulation stop, which is chosen in CAN DB tree in left main window by right mouse click</td>
</tr>
</tbody>
</table>
<h2 id="remote-control">Remote control</h2>
<p>CAN++ can be remote controlled. To do so start CAN++ with option <code>-server</code> on command line:</p>
<pre><code>can++.exe -server
</code></pre>
<p>Currently following actions can be taken:  </p>
<ul>
<li>Start CAN bus  </li>
<li>Stop CAN bus  </li>
<li>
<p>Send a generic command to C++ simulation, which can be used to trigger self-defined actions, examples may be:  </p>
<ul>
<li>call a test function  </li>
<li>set a global variable to switch behaviour  </li>
<li>send a CAN message provided by command string  </li>
<li>etc.  </li>
</ul>
</li>
</ul>
<p>Please see client example source code (Python, C# and C++) in folder examples/remote_control.</p>
<h2 id="filtering">Filtering</h2>
<p>Filtering is done by the check boxes in the left tree view in the main window. If a check box is deselected than corresponding data base, can message or channel is filtered out in trace view window. Apart from that the check boxes for signals work es enable/disable for graphical view.</p>
<h2 id="can-signal-graphs">CAN signal graphs</h2>
<p>CAN signals can be shown as graphs by:</p>
<pre><code>CAN =&gt; Graph...
</code></pre>
<p>or by toolbar 
<img alt="tb graph" src="img/toolbar_graph.jpg" /></p>
<p><img alt="graph" src="img/graph.jpg" /></p>
<p>Enabling signals as graphs is done by the check boxes in the left tree view in the main window.</p>
<h2 id="can-programming-in-c">CAN programming in C++</h2>
<p>CAN++ comes with an IDE and an integrated C++ compiler. So not further installation is needed. For each C++ file a separate DLL will be created on compiling. Each DLL is loaded when pushing button <strong>Start</strong> in CAN++. Please have a look at the example C++ file "<strong>ECU_main.cpp</strong>" in folder examples/simulation to see the features of CAN programming which are:</p>
<ul>
<li>second and milisecond timers (can be used to send cyclic messages for instance)</li>
<li>react on messages on bus (::onMessage())</li>
<li>react on signal changes</li>
<li>print messages (print window in CAN++: "CAN" =&gt; "Print Output...")</li>
<li>react on key presses</li>
<li>react on commands received from remote client program (See chapter "Remote control")</li>
</ul>
<p>Instead of the CAN++ IDE you can use your own of course. After first compiling of code CAN++ generates C++ classes for all CAN messages and signals (see canl/canl_data.cpp) so another IDE will give context input support too.</p>
<p>C++ files are managed by:</p>
<pre><code>CAN =&gt; Programming
</code></pre>
<p>or by toolbar <img alt="CAN programming" src="img/toolbar_canprog.jpg" /></p>
<p><img alt="CAN programming" src="img/programming.jpg" /></p>
<p>The checkbox <strong>Active</strong> is used to enable/disable CAN simulation by C++. Files can be imported or created. Existing files can be double clicked to open the IDE. A specific Channel can be selected from drop down in column <strong>Channel</strong>. Default "All" means that all received CAN traffic is routed to corresponding C++ file.</p>
<p>In the IDE you get context drop down menus for CAN data base variables like in following image:</p>
<p><img alt="CAN programming IDE with context drop down" src="img/programming_ide.jpg" /></p>
<p>Furthermore by right click at the cursor position you get a drop down menu with "<strong>Insert Database Element</strong>" to select a CAN message from Database Browser.  </p>
<p>To compile all C++ files do:</p>
<pre><code>Compile =&gt; Compile All
</code></pre>
<p>or press on the green arrow icon in the toolbar:</p>
<p><img alt="CAN programming compile all" src="img/programming_compile.jpg" /></p>
<p>Compiler errors will be shown in the "<strong>Output</strong>" window. By double clicking on a red error message cursor will jump to the corresponding line in the editor.</p>
<h2 id="can-diagnostics">CAN diagnostics</h2>
<p>Following CAN diagnostics can be performed:  </p>
<ul>
<li>faultmemory (read and clear)</li>
<li>measurement data (cyclic and single read)</li>
<li>identification</li>
<li>import PDX files</li>
<li>send tester present <img alt="TP" src="img/toolbar_tester_present.jpg" /></li>
</ul>
<p>Fault memory window:</p>
<p><img alt="Fault memory" src="img/faultmem.jpg" /></p>
<p>Measurements window:</p>
<p><img alt="Measurements" src="img/measurements.jpg" /></p>
<h2 id="can-statistics">CAN statistics</h2>
<p>CAN statistics are show in separate window by:</p>
<pre><code>CAN =&gt; Statistics
</code></pre>
<p>or by toolbar <img alt="stats" src="img/toolbar_stats.jpg" />  </p>
<p><img alt="Statistics" src="img/statistics.jpg" /></p>
<h2 id="tips">Tips</h2>
<h3 id="how-to-flash-supercan-firmware-on-adafruit-feather-m4-can-express-on-windows">How to flash SuperCAN firmware on Adafruit Feather M4 CAN Express (on Windows)</h3>
<ul>
<li>download SuperCAN firmware file supercan-firmware.tar.xz from https://github.com/jgressmann/supercan/releases/tag/latest-master</li>
<li>Unpack supercan-firmware.tar.xz (7-Zip could be used), needed file is supercan.uf2</li>
<li>plug in device</li>
<li>push the button on the device twice</li>
<li>a drive "FTHRBOOT" will show up in file explorer</li>
<li>drop the file supercan.uf2 on this drive</li>
<li>after 10 seconds replug the device</li>
</ul></div>
            </div>
        </div>

        <footer class="col-md-12">
            <hr>
            <p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
        </footer>
        <script>
            var base_url = ".",
                shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
        </script>
        <script src="js/base.js" defer></script>
        <script src="search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="searchModalLabel">Search</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
                <p>From here you can search these documents. Enter your search terms below.</p>
                <form>
                    <div class="form-group">
                        <input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results" data-no-results-text="No results found"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>

<!--
MkDocs version : 1.4.2
Build Date UTC : 2023-01-19 15:26:54.625146+00:00
-->
